#include<bits/stdc++.h>
#define all(a) a.begin(), a.end()
using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;

//std::mt19937 rng {std::chrono::steady_clock::now().time_since_epoch().count()};

int main() {
	
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);

	int a, b, c;
	std::cin >> a >> b >> c;
	if(b < c) {
		if(a < b || a > c) {
			std::cout << "Yes\n";
		} else {
			std::cout << "No\n";
		}
	} else {
		c += 24;
		a += 24;
		if(a < b || a > c) {
			std::cout << "Yes\n";
		} else {
			std::cout << "No\n";
		}
	}

	return 0;
}